package org.voyager.service.front.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.voyager.common.beans.JsonResult;
import org.voyager.service.front.VO.ScenicVo;
import org.voyager.service.front.subsystem.ScenicClient;

import com.alibaba.fastjson.JSONObject;


@RestController
@RequestMapping("/scenic")
public class ScenicController {

    @Autowired
    ScenicClient scenicClient;

    @PostMapping("/group/list")
    public JsonResult queryScenicGroups(@RequestBody ScenicVo scenicVo) {
        return scenicClient.queryScenicGroups(scenicVo);
    }

    @PostMapping("/spot/list")
    public JsonResult queryScenicSpots(@RequestBody ScenicVo scenicVo) {
        return scenicClient.queryScenicSpots(scenicVo);
    }
    
    @PostMapping("/spot/query")
    public JsonResult queryScenicSpotsById(@RequestBody JSONObject jo) {
    	return scenicClient.queryScenicSpotsById(jo);
    }
    
    @PostMapping("/spot/all")
    public JsonResult queryAll() {
    	return scenicClient.aueryAllList();
    }
}
